home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Resources / Chat & Communication / Digsby build 37 / digsby_setup.exe / lib / msn / p / MSNPSwitchboard.pyo (.txt) < prev   
Python Compiled Bytecode  |  2008-10-13  |  4KB  |  96 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyo (Python 2.5)
  3.  
  4. from util import StateMachine, Events
  5. from msn import CommandProcessor
  6. import logging
  7. log = logging.getLogger('msn.p.sb')
  8.  
  9. class MSNSwitchboard(Events.EventMixin, CommandProcessor):
  10.     events = Events.EventMixin.events | set(('on_buddy_join', 'on_buddy_leave', 'on_buddy_timeout', 'on_conn_success', 'on_authenticate', 'disconnect', 'contact_alias', 'needs_auth', 'recv_error', 'recv_action', 'transport_error'))
  11.     
  12.     def __init__(self, SckCls_or_sck, to_invite = (), server = ('', 0), cookie = None, sessionid = None):
  13.         Events.EventMixin.__init__(self)
  14.         CommandProcessor.__init__(self, log)
  15.         self._cookie = cookie
  16.         self._session = sessionid
  17.         self.has_connected = False
  18.         self.principals = []
  19.         if type(SckCls_or_sck) is type:
  20.             self.socket = None
  21.             self._socktype = SckCls_or_sck
  22.             self._server = server
  23.         else:
  24.             self.socket = SckCls_or_sck
  25.             self._socktype = type(self.socket)
  26.             self._server = self.socket.getpeername()
  27.         self._p2p_transport = None
  28.         self.bind('on_conn_success', (lambda this: setattr(this, 'has_connected', True)))
  29.  
  30.     
  31.     def _closed(self):
  32.         if not self.has_connected and not (self.socket):
  33.             pass
  34.         return self.socket._closed
  35.  
  36.     _closed = property(_closed)
  37.     
  38.     def self_buddy(self):
  39.         return NotImplemented
  40.  
  41.     self_buddy = property(self_buddy)
  42.     
  43.     def invite(self, bname):
  44.         return NotImplemented
  45.  
  46.     
  47.     def send_text_message(self, message, callback):
  48.         return NotImplemented
  49.  
  50.     
  51.     def on_send_message(self, msg):
  52.         return NotImplemented
  53.  
  54.     
  55.     def leave(self):
  56.         return NotImplemented
  57.  
  58.     
  59.     def send(self, msg):
  60.         return NotImplemented
  61.  
  62.     
  63.     def connect(self):
  64.         return NotImplemented
  65.  
  66.     
  67.     def disconnect(self):
  68.         return NotImplemented
  69.  
  70.     
  71.     def close_transport(self):
  72.         return NotImplemented
  73.  
  74.     
  75.     def on_conn_fail(self):
  76.         return NotImplemented
  77.  
  78.     
  79.     def on_conn_success(self):
  80.         return NotImplemented
  81.  
  82.     
  83.     def on_complete_auth(self):
  84.         return NotImplemented
  85.  
  86.     
  87.     def close_connection(self):
  88.         return NotImplemented
  89.  
  90.     
  91.     def on_error(self, msg):
  92.         CommandProcessor.on_error(self, msg)
  93.         self.event('recv_error', msg)
  94.  
  95.  
  96.